<?php
namespace controller;

use SimpleMVC\lib\Captcha;
use dao\TestDao;
use service\TestService;
use SimpleMVC\lib\DbException;

class Index extends Base {
	
	public function actionIndex()
	{
		$this->display('home');
	}
	
	public function actionTest()
	{
		$this->assign('a', 'aaa');
		$this->assign('b', 'bbb');
		$this->display('test');
	}
	
	public function actionTest2()
	{
		$testDao = new TestDao();
		var_dump($testDao->getUsers());
	}
	
	public function actionTest3()
	{
		$captcha = new Captcha();
		$code = $captcha->generateCode();
		ob_clean();
		$captcha->create($code);
	}
	
	public function actionTest4()
	{
		$testService = new TestService();
		$testService->test11();
	}
}